﻿using CaroLibraly;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace CaroClient
{
    public partial class frmCreateRoom : Form
    {
        public frmCreateRoom()
        {
            InitializeComponent();
        }

        private void btnCreate_Click(object sender, EventArgs e)
        {
            if (this.txtName.Text == "")
            {
                MessageBox.Show("Nhập tên phòng!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            Room r = new CaroLibraly.Room(Global.Player, this.txtName.Text, this.txtPassword.Text);
            Global.Server.CreateRoom(r);
            //Global.Server.JoinRoom(r, Global.Player);
        }
    }
}
